# Natural Experiment
The scripts in this directory execute our natural experiment analysis (Section 4.4, Appendix 7) using random variation in the testing propensity of the doctors/nurses on staff during each ED shift. We first calculate leave-one-out test rates within each 12 hour shift, and then use this leave-one-out rate as an instrument for testing in our regressions. We also estimate a shift random effect for testing propensity and plot marginal testing propensity by risk level (Figure 7). We check the exclusion restriction by verifying that tests in the previous k hours does not correlate with testing probability. Finally, we produce some testing effect estimates by simulating moving some high-risk patients from a low-testing to a high-testing shift.
